package com.kis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

/**
 * Created by wongloong on 16-12-8.
 */
@SpringBootApplication
@EnableAutoConfiguration(exclude = {ThymeleafAutoConfiguration.class, MongoAutoConfiguration.class})
@EnableEurekaClient
@EnableCircuitBreaker
@EnableFeignClients
public class OrderApp {
    public static void main(String[] args) {
        SpringApplication.run(new Object[]{OrderApp.class}, args);
    }

    public InitBindProducer initBindProducer() {
        InitBindProducer initBindProducer = new InitBindProducer();
        initBindProducer.addPreInitializeProducers(EventType.ASK_REDUCE_BALANCE);
        initBindProducer.addPreInitializeProducers(EventType.ASK_USE_COUPON);
        return initBindProducer;
    }
}
